iT邦幫忙

2022 iThome 鐵人賽

5

筆者覺得網路上繁體中文查到的C/C++面試題其實都有點過時了...
(像是MTK那份...)

這邊就只貼題目不貼答案了,畢竟答案會是與時俱進的

參考連結:
整理了一年的Linux C++武林秘籍,你早晚用得到(C++进阶必看)
https://medium.com/@alexander.s.augenstein/how-i-passed-the-c-code-interview-in-3-weeks-a3e350214a01
C++工程师面试题"大全"
羅根學習筆記

C++ keyword related

4 kind cast
http://ot-note.logdown.com/posts/173174/note-cpp-named-type-convertion
4 kind static
https://shengyu7697.github.io/cpp-static/

namespace/ using namespace

c++ exceptions
try catch

override
noexcept
member function ref-qualifiers

c++ new/ operator new/ placement new

std::ref()
https://shengyu7697.github.io/std-ref/

c++ template (template好難Orz)
https://kknews.cc/zh-tw/n/pjllqv8.html

variadic template
https://tjsw.medium.com/%E6%BD%AE-c-variadic-template-parameter-pack-d76c0a4ffcdd

fallthrough、nodiscard、maybe_unused
https://zh-blog.logan.tw/2020/07/19/cxx-17-fallthrough-nodiscard-maybe-unused-attribute/

Memory related

https://marek.vavrusa.com/memory/
https://hackmd.io/@sysprog/c-function
https://hackmd.io/@sysprog/c-memory

memory layout, heap stack

virtual memory / page fault / cache miss

class bit field alignment
https://stackoverflow.com/questions/57244787/c-memory-alignment-should-we-care

POD and why they are special
https://stackoverflow.com/questions/15212261/default-initialization-of-pod-types-in-c

virtual function and inherit
https://www.ptt.cc/bbs/C_and_CPP/M.1522727559.A.A71.html

vtable

little endian big endian

IEEE754

2's complement representation
(what happen when shift a negative int)

mmap pipe

C++ 新特性

const/constexpr/if constexpr/constinit/consteval
https://www.hackingnote.com/en/cpp/const-vs-constexpr

move emplace_back
prvalue lvalue xvalue
RVO, named RVO

RAII

unique_ptr/shared_ptr/auto_ptr/weak_ptr

string_view
https://zh-blog.logan.tw/2019/01/23/cxx17-string-view-map-and-heterogeneous-comparison-lookup/

std::array
std::function
std::forward
std::variant and std::visit
https://arne-mertz.de/2018/05/modern-c-features-stdvariant-and-stdvisit/

Basic thread/process topic

mutex/ condition_variable
unique_lock/lock_guard

thread_local
https://murphypei.github.io/blog/2020/02/thread-local

read/write lock

std::unique_lock<std::shared_mutex> wLock(g_mutex);
std::shared_lock<std::shared_mutex> rLock(g_mutex);

https://chenlen.com/c-17-%E7%9A%84-read-write-lock-%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/

false sharing
priority inversion

atomic operation / CAS / ABA problem
(這個真的是難)

Basic compilation flow

.so .a .o
https://www.ptt.cc/man/C_and_CPP/DBF2/D139/DA10/M.1212250886.A.DF4.html

how share library works

compiler/linker
https://myao0730.blogspot.com/2015/09/csapplinking.html

Misc

standard implicit conversion rule
https://stackoverflow.com/questions/46073295/implicit-type-promotion-rules

CRTP 靜態多型
https://blog.csdn.net/hit_shaoqi/article/details/104403551

std::execution::par

Design Pattern:
c++ singleton
https://shengyu7697.github.io/cpp-singleton-pattern/

char array vs charstring
https://www.cnblogs.com/oomusou/archive/2007/03/04/663234.html

讀者有什麼好的題目或是學習資源推薦也可以留言我會貼上來!


上一篇
On board之後才是挑戰的開始
系列文
0到100的軟體工程師面試之路31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
JC
iT邦新手 2 級 ‧ 2022-10-28 00:20:33

跪拜大神

我要留言

立即登入留言